// import Vue from 'vue'

export const $post = function(){
    console.log('$post')
    const xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            console.log(this.responseText)
        }
    };
    xhttp.open("POST", "http://www.w3school.com.cn/demo/demo_get.asp", true);
    xhttp.send();
}

export const $get = function(){
    console.log('$get')
    const xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            console.log(this.responseText)
        }
    };
    xhttp.open("GET", "http://www.w3school.com.cn/demo/demo_get.asp", true);
    xhttp.send();
}